void useTetrahedron()
{
	polyhedron = polyhedron4;
	polyhedronNbFacets = polyhedron4facets;
	equations = (FP_POINT*)malloc(polyhedronNbFacets * sizeof(FP_POINT));
	computeEquations(equations,polyhedron,polyhedronNbFacets);
}

void useCube()
{
	polyhedron = polyhedron6;
	polyhedronNbFacets = polyhedron6facets;
	equations = (FP_POINT*)malloc(polyhedronNbFacets * sizeof(FP_POINT));
	computeEquations(equations,polyhedron,polyhedronNbFacets);
}

void useOctahedron()
{
	polyhedron = polyhedron8;
	polyhedronNbFacets = polyhedron8facets;
	equations = (FP_POINT*)malloc(polyhedronNbFacets * sizeof(FP_POINT));
	computeEquations(equations,polyhedron,polyhedronNbFacets);
}

void useDodecahedron()
{
	polyhedron = polyhedron12;
	polyhedronNbFacets = polyhedron12facets;
	equations = (FP_POINT*)malloc(polyhedronNbFacets * sizeof(FP_POINT));
	computeEquations(equations,polyhedron,polyhedronNbFacets);
}

void useIcosahedron()
{
	polyhedron = polyhedron20;
	polyhedronNbFacets = polyhedron20facets;
	equations = (FP_POINT*)malloc(polyhedronNbFacets * sizeof(FP_POINT));
	computeEquations(equations,polyhedron,polyhedronNbFacets);
}

void usePolyhedron(U32 polyhedron)
{
	polyhedronType = polyhedron;

	switch (polyhedron)
	{
	case POLY_TETRAHEDRON:
		useTetrahedron();
		break;

	case POLY_CUBE:
		useCube();
		break;

	case POLY_OCTAHEDRON:
		useOctahedron();
		break;

	case POLY_DODECAHEDRON:
		useDodecahedron();
		break;

	case POLY_ICOSAHEDRON:
		useIcosahedron();
		break;
	}
}


void useComputationMethod(U32 method, U32 maxNbCubes)
{
	switch(method)
	{
	case METHOD_MEMORY:
		STOCK_init(sizeof(CUBE),maxNbCubes);
		break;

	case METHOD_NOMEMORY:
		STOCK_init(sizeof(SIMPLE_CUBE),maxNbCubes);
		break;
	}
}

void resetVolumeData()
{
	currentError = 0;
	currentSum = 0;
	nbComputatedCubes = 0;
	calls = 0;
}




		